const hashmap = require("hashmap");
var cart = new hashmap();

exports.updateCart = function (req, res) {
    var mid = req.session.mid;
    // var mid = 1;
    cart.set(mid,req.body);
    res.json([]);
}

exports.loadCart = function(req,res){
    var mid = req.session.mid;
    // var mid = 1;
    var c = cart.get(mid);
    if(c){
        res.json(c);
    }else{
        res.json([]);
    }
}

